export default{
	// 公共导航方法
	navigateTo(path,params){
		let url = '/pages/'+path+'/'+path
		if(params && params.length > 0){
			url += '?'+params
		}
		uni.navigateTo({
			url
		});
	},
	
	switchTab(index=0,params){
		let url = '../index/index'
		switch (index){
			case 1:
			url = '../cate/cate'
				break;
			case 2:
			url = '../my/my'
				break;
			default:
				break;
		}
		if(params && params.length > 0){
			url += '?'+params
		}
		uni.switchTab({
			url
		})
	}
}